package cn.tedu.mvc.controller;

import cn.tedu.mvc.pojo.vo.JsonResult;
import cn.tedu.mvc.pojo.vo.StatusCode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ExceptionController {
    @GetMapping("/api/exp/{n1}/{n2}")
    public JsonResult doArithmetic(@PathVariable("n1") Long n1, @PathVariable("n2") Long n2) {
        Long result = n1 / n2;
        return new JsonResult(result);
    }
}
